package com.example.ktapplication.activity

import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.View
import com.bumptech.glide.Glide
import com.example.ktapplication.AppGlobals
import com.example.ktapplication.R
import com.example.ktapplication.base.BaseActivity
import com.example.ktapplication.databinding.ActivityAboutBinding

class AboutActivity: BaseActivity<ActivityAboutBinding>() {

    val content:String="基于WanAndroid API开发的技术类文章阅读应用.\n" +
            "\n" +
            "技术点:\n" +
            "\n"+
            "使用Ktolin开发语言+ViewBinding减少findViewById的使用\n" +
            "\n"+
            "使用协程代替线程\n" +
            "\n"+
            "Retrofit+LiveData封装网络请求，支持https\n" +
            "\n"+
            "使用SwipeRefreshLayoutr实现列表的下拉刷新和上拉加载\n" +
            "\n"+
            "使用FlowLayout动态添加各种样式标签\n" +
            "\n"+
            "使用DrawerLayout+BottomNavigationView+Fragment实现侧边栏加底部导航的App整体结构\n" +
            "\n"+
            "使用TabLayout+ViewPager+Fragment实现顶部导航布局\n" +
            "\n"+
            "双RecyclerView滑动联动，效果见导航界面\n" +
            "\n"+
            "使用自定义MultiStatusView实现多状态布局\n" +
            "\n"+
            "使用Glide加载图片\n" +
            "\n"+
            "使用Theme.AppCompat.DayNight主题实现夜间模式，切换几乎无抖动\n" +
            "\n"+
            "使用Facebook的ShimmerFrameLayout布局实现闪光文字\n" +
            "\n"+
            "实现使用Service+Notification后台播放音视频播放功能\n" +
            "\n"+
            "使用调用系统定位、摄像头，相册调用，拍照，清理App缓存，打电话，读取通信录等功能\n" +
            "\n"+
            "使用WebView实现访问网页\n" +
            "\n"+
            "使用 AutoSize 等比例缩放进行屏幕适配\n" +
            "\n"+
            "bugly日志上报和版本更新"

    companion object {
        fun start(context: Context) {
            val intent = Intent(context, AboutActivity::class.java)
            context.startActivity(intent)
        }
    }

    override fun getViewBind(): ActivityAboutBinding {
        return ActivityAboutBinding.inflate(layoutInflater)
    }

    override fun onDate(savedInstanceState: Bundle?) {

    }

    override fun onViewBing() {
        binding.settingTitleBar.tvTitle!!.text="关于App"
        binding.settingTitleBar.imgFind!!.visibility= View.GONE
        binding.settingTitleBar.imgMenu!!.let {
            Glide.with(
                AppGlobals
                .getApplication())
                .load(R.mipmap.left)
                .into(it)

        }
        binding.settingTitleBar.imgMenu!!.setOnClickListener(View.OnClickListener {
            finish()
        })
        binding.tvContent.text=content
    }

}